/*
 * variables.h
 *
 *  Created on: 07/05/2010
 *      Author: teledhil
 */

#ifndef VARIABLES_H_
#define VARIABLES_H_

#include <pthread.h>
#include "constantes.h"
#include "hilo.h"

extern bool debugMode;

extern char nick[BUFFER];
extern char username[BUFFER];
extern char realname[BUFFER];

extern char channel[BUFFER]; /*Canal actual*/
extern char channelDesired[BUFFER]; /*Canal al que se quiere conectar*/

extern char servidor[BUFFER];
extern int puerto;
extern int socketServer;
extern int socketDownload;
extern int socketUpload;

/*Threads*/
extern pthread_t threadEscuchas;
extern bool threadEscuchasLanzado;
extern Hilo hiloDownloads;
extern Hilo hiloUploads;
extern Hilo hiloEscuchas;

/*Variables de estado*/
extern bool state_connected;
extern bool state_inChannel;
extern bool state_powerOff;
extern int state_sleep;

/*Fichero descarga*/
extern char file_dl_path[BUFFER];
extern int file_dl_fd;
extern long file_dl_size;

/*Fichero subida*/
extern char file_ul_path[BUFFER];
extern int file_ul_fd;
extern long file_ul_size;
extern char file_ul_nick[BUFFER];

#endif /* VARIABLES_H_ */
